using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace server
{
    public partial class SelectAppForm : Form
    {
        public SelectAppForm(string name)
        {
            InitializeComponent();
            this.Text = name;
        }

        private void InstallaForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'remjobDataSet.Applications' table. You can move, or remove it, as needed.
            this.applicationsTableAdapter.Fill(this.remjobDataSet.Applications);

        }

        public DataGridViewRow selectedRow
        {
            get
            {
                System.Collections.IEnumerator enumerator = (System.Collections.IEnumerator)dataGridView1.SelectedRows.GetEnumerator();
                enumerator.MoveNext();
                return (DataGridViewRow)enumerator.Current;
            }
        }

        public string SelectedAppName
        {
            get
            {
                return (string)selectedRow.Cells[0].Value;
            }
        }

        public ushort SelectedAppId
        {
            get
            {
                return (ushort)((int)selectedRow.Cells[1].Value);
            }
        }
    }
}